package utils

import (
	"fmt"
)

func Calc(n1 float64,n2 float64,char byte) float64 {
	var result float64
	switch char {
	case '+':
		result = n1 + n2
	case '-':
		result = n1 - n2
	case '*':
		result = n1 * n2
	case '/':
		result = n1 / n2
	default:
		fmt.Println("运算符不识别")
	}

	return result
}
